home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 21 / Cream of the Crop 21 (Terry Blount) (October 1996).iso / doom / qplus10.zip / DEFS.QC < prev    next >
Text File  |  1996-08-18  |  18KB  |  698 lines

  1.  
  2. /*
  3. ==============================================================================
  4.  
  5.             SOURCE FOR GLOBALVARS_T C STRUCTURE
  6.  
  7. ==============================================================================
  8. */
  9.  
  10. //
  11. // system globals
  12. //
  13. entity        self;
  14. entity        other;
  15. entity        world;
  16. float        time;
  17. float        frametime;
  18.  
  19. float        force_retouch;        // force all entities to touch triggers
  20.                                 // next frame.  this is needed because
  21.                                 // non-moving things don't normally scan
  22.                                 // for triggers, and when a trigger is
  23.                                 // created (like a teleport trigger), it
  24.                                 // needs to catch everything.
  25.                                 // decremented each frame, so set to 2
  26.                                 // to guarantee everything is touched
  27. string        mapname;
  28.  
  29. float        deathmatch;
  30. float        coop;
  31. float        teamplay;
  32.  
  33. float        serverflags;        // propagated from level to level, used to
  34.                                 // keep track of completed episodes
  35.  
  36. float        total_secrets;
  37. float        total_monsters;
  38.  
  39. float        found_secrets;        // number of secrets found
  40. float        killed_monsters;    // number of monsters killed
  41.  
  42.  
  43. // spawnparms are used to encode information about clients across server
  44. // level changes
  45. float        parm1, parm2, parm3, parm4, parm5, parm6, parm7, parm8, parm9, parm10, parm11, parm12, parm13, parm14, parm15, parm16;
  46.  
  47. //
  48. // global variables set by built in functions
  49. //    
  50. vector        v_forward, v_up, v_right;    // set by makevectors()
  51.     
  52. // set by traceline / tracebox
  53. float        trace_allsolid;
  54. float        trace_startsolid;
  55. float        trace_fraction;
  56. vector        trace_endpos;
  57. vector        trace_plane_normal;
  58. float        trace_plane_dist;
  59. entity        trace_ent;
  60. float        trace_inopen;
  61. float        trace_inwater;
  62.  
  63. entity        msg_entity;                // destination of single entity writes
  64.  
  65. //
  66. // required prog functions
  67. //
  68. void()         main;                        // only for testing
  69.  
  70. void()        StartFrame;
  71.  
  72. void()         PlayerPreThink;
  73. void()         PlayerPostThink;
  74.  
  75. void()        ClientKill;
  76. void()        ClientConnect;
  77. void()         PutClientInServer;        // call after setting the parm1... parms
  78. void()        ClientDisconnect;
  79.  
  80. void()        SetNewParms;            // called when a client first connects to
  81.                                     // a server. sets parms so they can be
  82.                                     // saved off for restarts
  83.  
  84. void()        SetChangeParms;            // call to set parms for self so they can
  85.                                     // be saved for a level transition
  86.  
  87.  
  88. //================================================
  89. void        end_sys_globals;        // flag for structure dumping
  90. //================================================
  91.  
  92. /*
  93. ==============================================================================
  94.  
  95.             SOURCE FOR ENTVARS_T C STRUCTURE
  96.  
  97. ==============================================================================
  98. */
  99.  
  100. //
  101. // system fields (*** = do not set in prog code, maintained by C code)
  102. //
  103. .float        modelindex;        // *** model index in the precached list
  104. .vector        absmin, absmax;    // *** origin + mins / maxs
  105.  
  106. .float        ltime;            // local time for entity
  107. .float        movetype;
  108. .float        solid;
  109.  
  110. .vector        origin;            // ***
  111. .vector        oldorigin;        // ***
  112. .vector        velocity;
  113. .vector        angles;
  114. .vector        avelocity;
  115.  
  116. .vector        punchangle;        // temp angle adjust from damage or recoil
  117.  
  118. .string        classname;        // spawn function
  119. .string        model;
  120. .float        frame;
  121. .float        skin;
  122. .float        effects;
  123.  
  124. .vector        mins, maxs;        // bounding box extents reletive to origin
  125. .vector        size;            // maxs - mins
  126.  
  127. .void()        touch;
  128. .void()        use;
  129. .void()        think;
  130. .void()        blocked;        // for doors or plats, called when can't push other
  131.  
  132. .float        nextthink;
  133. .entity        groundentity;
  134.  
  135. // stats
  136. .float        health;
  137. .float        frags;
  138. .float        weapon;            // one of the IT_SHOTGUN, etc flags
  139. .string        weaponmodel;
  140. .float        weaponframe;
  141. .float        currentammo;
  142. .float        ammo_shells, ammo_nails, ammo_rockets, ammo_cells;
  143.  
  144. .float        items;            // bit flags
  145.  
  146. .float        takedamage;
  147. .entity        chain;
  148. .float        deadflag;
  149.  
  150. .vector        view_ofs;            // add to origin to get eye point
  151.  
  152.  
  153. .float        button0;        // fire
  154. .float        button1;        // use
  155. .float        button2;        // jump
  156.  
  157. .float        impulse;        // weapon changes
  158.  
  159. .float        fixangle;
  160. .vector        v_angle;        // view / targeting angle for players
  161. .float        idealpitch;        // calculated pitch angle for lookup up slopes
  162.  
  163.  
  164. .string        netname;
  165.  
  166. .entity     enemy;
  167.  
  168. .float        flags;
  169.  
  170. .float        colormap;
  171. .float        team;
  172.  
  173. .float        max_health;        // players maximum health is stored here
  174.  
  175. .float        teleport_time;    // don't back up
  176.  
  177. .float        armortype;        // save this fraction of incoming damage
  178. .float        armorvalue;
  179.  
  180. .float        waterlevel;        // 0 = not in, 1 = feet, 2 = wast, 3 = eyes
  181. .float        watertype;        // a contents value
  182.  
  183. .float        ideal_yaw;
  184. .float        yaw_speed;
  185.  
  186. .entity        aiment;
  187.  
  188. .entity     goalentity;        // a movetarget or an enemy
  189.  
  190. .float        spawnflags;
  191.  
  192. .string        target;
  193. .string        targetname;
  194.  
  195. // damage is accumulated through a frame. and sent as one single
  196. // message, so the super shotgun doesn't generate huge messages
  197. .float        dmg_take;
  198. .float        dmg_save;
  199. .entity        dmg_inflictor;
  200.  
  201. .entity        owner;        // who launched a missile
  202. .vector        movedir;    // mostly for doors, but also used for waterjump
  203.  
  204. .string        message;        // trigger messages
  205.  
  206. .float        sounds;        // either a cd track number or sound number
  207.  
  208. .string        noise, noise1, noise2, noise3;    // contains names of wavs to play
  209.  
  210. //================================================
  211. void        end_sys_fields;            // flag for structure dumping
  212. //================================================
  213.  
  214. /*
  215. ==============================================================================
  216.  
  217.                 VARS NOT REFERENCED BY C CODE
  218.  
  219. ==============================================================================
  220. */
  221.  
  222.  
  223. //
  224. // constants
  225. //
  226.  
  227. float    FALSE                    = 0;
  228. float     TRUE                    = 1;
  229.  
  230. // edict.flags
  231. float    FL_FLY                    = 1;
  232. float    FL_SWIM                = 2;
  233. float    FL_OBJECT                = 4;    //ws
  234. float    FL_CLIENT                = 8;    // set for all client edicts
  235. float    FL_INWATER                = 16;    // for enter / leave water splash
  236. float    FL_MONSTER                = 32;
  237. float    FL_GODMODE                = 64;    // player cheat
  238. float    FL_NOTARGET                = 128;    // player cheat
  239. float    FL_ITEM                = 256;    // extra wide size for bonus items
  240. float    FL_ONGROUND                = 512;    // standing on something
  241. float    FL_PARTIALGROUND            = 1024;    // not all corners are valid
  242. float    FL_WATERJUMP            = 2048;    // player jumping out of water
  243. float    FL_JUMPRELEASED            = 4096;    // for jump debouncing
  244. float    FL_FRIENDLY                = 8192;    //ws
  245.  
  246. // edict.movetype values
  247. float    MOVETYPE_NONE            = 0;    // never moves
  248. //float    MOVETYPE_ANGLENOCLIP    = 1;
  249. //float    MOVETYPE_ANGLECLIP        = 2;
  250. float    MOVETYPE_WALK            = 3;    // players only
  251. float    MOVETYPE_STEP            = 4;    // discrete, not real time unless fall
  252. float    MOVETYPE_FLY            = 5;
  253. float    MOVETYPE_TOSS            = 6;    // gravity
  254. float    MOVETYPE_PUSH            = 7;    // no clip to world, push and crush
  255. float    MOVETYPE_NOCLIP            = 8;
  256. float    MOVETYPE_FLYMISSILE        = 9;    // fly with extra size against monsters
  257. float    MOVETYPE_BOUNCE            = 10;
  258. float    MOVETYPE_BOUNCEMISSILE    = 11;    // bounce with extra size
  259.  
  260. // edict.solid values
  261. float    SOLID_NOT                = 0;    // no interaction with other objects
  262. float    SOLID_TRIGGER            = 1;    // touch on edge, but not blocking
  263. float    SOLID_BBOX                = 2;    // touch on edge, block
  264. float    SOLID_SLIDEBOX            = 3;    // touch on edge, but not an onground
  265. float    SOLID_BSP                = 4;    // bsp clip, touch on edge, block
  266.  
  267. // range values
  268. float    RANGE_MELEE                = 0;
  269. float    RANGE_NEAR                = 1;
  270. float    RANGE_MID                = 2;
  271. float    RANGE_FAR                = 3;
  272.  
  273. // deadflag values
  274.  
  275. float    DEAD_NO                    = 0;
  276. float    DEAD_DYING                = 1;
  277. float    DEAD_DEAD                = 2;
  278. float    DEAD_RESPAWNABLE        = 3;
  279.  
  280. // takedamage values
  281.  
  282. float    DAMAGE_NO                = 0;
  283. float    DAMAGE_YES                = 1;
  284. float    DAMAGE_AIM                = 2;
  285.  
  286. // items
  287. float    IT_AXE                    = 4096;
  288. float    IT_SHOTGUN                = 1;
  289. float    IT_SUPER_SHOTGUN        = 2;
  290. float    IT_NAILGUN                = 4;
  291. float    IT_SUPER_NAILGUN        = 8;
  292. float    IT_GRENADE_LAUNCHER        = 16;
  293. float    IT_ROCKET_LAUNCHER        = 32;
  294. float    IT_LIGHTNING            = 64;
  295. float    IT_EXTRA_WEAPON            = 128;
  296.  
  297. float    IT_SHELLS                = 256;
  298. float    IT_NAILS                = 512;
  299. float    IT_ROCKETS                = 1024;
  300. float    IT_CELLS                = 2048;
  301.  
  302. float    IT_ARMOR1                = 8192;
  303. float    IT_ARMOR2                = 16384;
  304. float    IT_ARMOR3                = 32768;
  305. float    IT_SUPERHEALTH            = 65536;
  306.  
  307. float    IT_KEY1                    = 131072;
  308. float    IT_KEY2                    = 262144;
  309.  
  310. float    IT_INVISIBILITY            = 524288;
  311. float    IT_INV